// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:15


// Source File Name:   p3.java

package com.zelix;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.EventObject;
import javax.swing.*;
import javax.swing.text.JTextComponent;


//            a3, eo, zo, as, 
//            to, yw, f2, k4, 
//            zz, q4, m4, qz, 
//            rz, vz, j0, tb

public class p3 extends a3
    implements eo, ActionListener, KeyListener
{

    JFrame f;
    String g;
    as h;
    yw i;
    k4 j;
    JTextArea k;
    JButton l;
    JButton m;
    JButton n;
    JButton o;
    boolean p;
    static String q[];
    static String r[];
    private static String z[];

    public p3(JFrame jframe, String s, String s1, as as1, yw yw1)
    {
        super(jframe, s, s1);
        f = jframe;
        h = as1;
        i = yw1;
        g();
        zz.b(m);
    }

    public void actionPerformed(ActionEvent actionevent)
    {
label0:
        {
            boolean flag = tb.b;
            Object obj = actionevent.getSource();
            if(obj == l)
            {
                j();
                if(!flag)
                    break label0;
            }
            if(obj == m)
            {
                k();
                if(!flag)
                    break label0;
            }
            if(obj == n)
            {
                f();
                if(!flag)
                    break label0;
            }
            if(obj == o)
                i();
        }
    }

    protected void f()
    {
        p = true;
        a();
        i.a();
    }

    public void a()
    {
        super.a();
        if(!p)
            i.a();
    }

    protected void i()
    {
        to.a(to.Q);
    }

    public void keyPressed(KeyEvent keyevent)
    {
label0:
        {
            boolean flag = tb.b;
            if(keyevent.getKeyCode() != 10)
                break label0;
            if(keyevent.getSource() == l)
            {
                j();
                if(!flag)
                    break label0;
            }
            if(keyevent.getSource() == m)
            {
                k();
                if(!flag)
                    break label0;
            }
            if(keyevent.getSource() == n)
            {
                f();
                if(!flag)
                    break label0;
            }
            if(keyevent.getSource() == o)
                i();
        }
    }

    public void keyReleased(KeyEvent keyevent)
    {
    }

    public void keyTyped(KeyEvent keyevent)
    {
    }

    void j()
    {
        p = true;
        a();
        i.a(new Integer(2));
    }

    void k()
    {
        File file;
label0:
        {
            boolean flag = tb.b;
            if(h.h() != null)
            {
                File file1 = new File(h.h());
                if(file1.exists() && file1.isDirectory())
                {
                    file = file1;
                    if(!flag)
                        break label0;
                }
                file = new File(zo.h);
                if(!flag)
                    break label0;
            }
            file = new File(zo.h);
        }
        qz aqz[] = {
            new vz(), new rz()
        };
        m4 m4_1 = new m4(file, false, 1, aqz, 0, true);
        m4_1.c(new File(file, z[1]));
        int i1 = m4_1.b(this, z[0]);
        if(i1 == 1)
        {
            File file2 = m4_1.e();
            BufferedWriter bufferedwriter = null;
            try
            {
                bufferedwriter = new BufferedWriter(new FileWriter(file2));
                bufferedwriter.write(g, 0, g.length());
                bufferedwriter.close();
                String s = file2.getParent();
                if(s != null)
                {
                    h.f(s);
                    h.l();
                }
            }
            catch(IOException ioexception)
            {
                new f2(this, z[4], z[2] + file2.getAbsolutePath() + z[3] + ioexception.getMessage());
            }
            finally
            {
                if(bufferedwriter != null)
                    try
                    {
                        bufferedwriter.close();
                        bufferedwriter = null;
                    }
                    catch(IOException _ex) { }
            }
        }
    }

    protected void a(Object obj, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5, Object obj6)
    {
        g = (String)obj;
        Container container = getContentPane();
        j0 j0_1 = new j0(container);
        container.setLayout(j0_1);
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        setSize(Math.min(600, dimension.width), Math.min(480, dimension.height));
        l = new JButton(z[9]);
        l.setToolTipText(to.b(to.V));
        m = new JButton(z[8]);
        m.setToolTipText(to.b(to.dc));
        n = new JButton(z[12]);
        n.setToolTipText(to.b(to.Z));
        o = new JButton(z[13]);
        o.setToolTipText(to.b(to.ab));
        l.addActionListener(this);
        m.addActionListener(this);
        n.addActionListener(this);
        o.addActionListener(this);
        l.addKeyListener(this);
        m.addKeyListener(this);
        n.addKeyListener(this);
        o.addKeyListener(this);
        container.add(l, z[7]);
        container.add(m, z[6]);
        container.add(n, z[5]);
        container.add(o, z[10]);
        j = new k4(true);
        container.add(j, z[11]);
        j0_1.a(q);
        l();
        setIconImage(zo.a(this));
    }

    void l()
    {
        j0 j0_1 = new j0(j);
        j.setLayout(j0_1);
        k = new JTextArea(g);
        k.setFont(new Font(z[15], 0, 14));
        k.setEditable(false);
        j.add(new q4(k), z[14]);
        j0_1.a(r);
    }

    private static char[] z(String str) {
        char ac[] = str.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 0xb;
        return ac;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x61;
                    break;
                case 1:
                    key = 24;
                    break;
                case 2:
                    key = 25;
                    break;
                case 3:
                    key = 100;
                    break;
                default:
                    key = 11;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        String as1[] = new String[16];
        as1[0] = "2yo\001+;STDX\002jp\024\177A^p\bn";
        as1[1] = "\022{k\r{\0256m\034\177";
        as1[2] = "\"wl\bo\017?mDx\000n|D)";
        as1[3] = "C8#D";
        as1[4] = "'qu\001+$jk\013y";
        as1[5] = "\002yw\007n\rZm\n";
        as1[6] = "\022yo\001I\025v";
        as1[7] = "\021j|\022b\016mj&\177\017";
        as1[8] = "2yo\001";
        as1[9] = "1j|\022b\016mj";
        as1[10] = "\t}u\024I\025v";
        as1[11] = "\fyp\n[\017t";
        as1[12] = "$`p\020";
        as1[13] = ")}u\024";
        as1[14] = "\022{k\r{\025Yk\001j";
        as1[15] = z(z("\"wl\026b\004j"));
        z = as1;
        String as2[] = new String[24];
        as2[0] = "\ry`\013~\0256t\re6q}\020c\\zm\n\\\b|m\f!U3+Q";
        as2[1] = "\ry`\013~\0256t\re)}p\003c\025%+Q;";
        as2[2] = "\fyp\n[\017t7\020d\021%)";
        as2[3] = "\fyp\n[\017t7\bn\007l$T";
        as2[4] = "\fyp\n[\017t7\026b\006pmYh\016vm\005b\017}kJy\b\177q\020";
        as2[5] = "\fyp\n[\017t7\006d\025lv\t6\002ww\020j\bv|\026%\003wm\020d\f5{\020e)}p\003c\0255(T";
        as2[6] = "\003lw3b\005lqYf\000`1\024y\004np\013~\022Zm\n%\005}\177\005~\rlN\ro\025p5Dx\000n|&\177\0176}\001m\000mu\020\\\b|m\f'A{x\nh\004t[\020eO||\002j\024tm3b\005lqH+\t}u\024I\025v7\000n\007yl\b\1776q}\020cH";
        as2[7] = "\003lw,n\b\177q\0206\fyaL{\023}o\rd\024k[\020eO||\002j\024tm,n\b\177q\020'Akx\022n#lwJo\004~x\021g\025P|\rl\tl5Dh\000vz\001g#lwJo\004~x\021g\025P|\rl\tl5Dc\004ti&\177\0176}\001m\000mu\020C\004q~\f\177H";
        as2[8] = "\021j|\022b\016mj&\177\0176m\013{\\ux\re1vuJi\016lm\013fJ-";
        as2[9] = "\021j|\022b\016mj&\177\0176z\001e\025}k<6\002ww\020j\bv|\026%\026q}\020cK)+K:Q(";
        as2[10] = "\021j|\022b\016mj&\177\0176n\ro\025p$\006\177\017Op\000\177\t";
        as2[11] = "\021j|\022b\016mj&\177\0176q\001b\006pmYi\025vQ\001b\006pm";
        as2[12] = "\022yo\001I\025v7\020d\021%i\026n\027qv\021x#lwJ\177\016h";
        as2[13] = "\022yo\001I\025v7\007n\017l|\026S\\{v\n\177\000qw\001yOop\000\177\t2*S$P()";
        as2[14] = "\022yo\001I\025v7\023b\005lqYi\025vN\ro\025p";
        as2[15] = "\022yo\001I\025v7\fn\b\177q\0206\003lw,n\b\177q\020";
        as2[16] = "\002yw\007n\rZm\n%\025wiY{\023}o\rd\024k[\020eOlv\024";
        as2[17] = "\002yw\007n\rZm\n%\002}w\020n\023@$\007d\017lx\re\004j7\023b\005lqN=S7(T;";
        as2[18] = "\002yw\007n\rZm\n%\026q}\020c\\zm\n\\\b|m\f";
        as2[19] = "\002yw\007n\rZm\n%\t}p\003c\025%{\020e)}p\003c\025";
        as2[20] = "\t}u\024I\025v7\020d\021%i\026n\027qv\021x#lwJ\177\016h";
        as2[21] = "\t}u\024I\025v7\007n\017l|\026S\\{v\n\177\000qw\001yOop\000\177\t2!S$P()";
        as2[22] = "\t}u\024I\025v7\023b\005lqYi\025vN\ro\025p";
        as2[23] = "\t}u\024I\025v7\fn\b\177q\0206\003lw,n\b\177q\020";
        q = as2;
        String as3[] = new String[4];
        as3[0] = "\022{k\r{\025Yk\001jOlv\0246T";
        as3[1] = "\022{k\r{\025Yk\001jOt|\002\177\\-";
        as3[2] = "\022{k\r{\025Yk\001jOjp\003c\025%z\013e\025yp\nn\0236k\rl\tl4Q";
        as3[3] = z(z("\022{k\r{\025Yk\001jOzv\020\177\016u$\007d\017lx\re\004j7\006d\025lv\t&T"));
        r = as3;
    }
}